<div>
    Logged as: <?php echo $this->username;?>
</div>
<?php if ($this->isUserLoggedIn):?>
    <?php echo $this->logoutForm;?>
<?php else:?>
    <?php echo $this->loginForm;?>
<?php endif;?>